package work.atpgroup.service.impl;

import org.springframework.stereotype.Service;
import work.atpgroup.entity.WebPage;
import work.atpgroup.mapper.WebPageMapper;
import work.atpgroup.service.WebPageService;

import javax.annotation.Resource;
import java.util.List;

@Service("webPageService")
public class WebPageServiceImpl implements WebPageService {
    @Resource(name="webPageMapper")
    private WebPageMapper webPageMapper;
    @Override
    public int insertWebPage(WebPage webPage) {
        return webPageMapper.insertWebPage(webPage);
    }

    @Override
    public int updateWebPage(WebPage webpage) {
        return webPageMapper.updateWebPage(webpage);
    }

    @Override
    public int deleteWebPage(WebPage webpage) {
        return webPageMapper.deleteWebPage(webpage);
    }

    @Override
    public WebPage getWebPageById(Integer webPageId) {
        return webPageMapper.getWebPageById(webPageId);
    }

    @Override
    public List<WebPage> getWebPageByUserId(Integer userId) {
        return webPageMapper.getWebPageByUserId(userId);
    }

    @Override
    public WebPage getWebPageByUri(String uri) {
        return webPageMapper.getWebPageByUri(uri);
    }

    @Override
    public int getWebPageSizeByUserId(Integer userId) {
        return webPageMapper.getWebPageSizeByUserId(userId);
    }
}
